/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package raccoon.suvisa.datos.entities;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Laura
 */
@Entity
@Table(name = "PRESTAMOXCUENTA", catalog = "", schema = "IS963601")
@NamedQueries({@NamedQuery(name = "Prestamoxcuenta.findAll", query = "SELECT p FROM Prestamoxcuenta p"), @NamedQuery(name = "Prestamoxcuenta.findByIdPrestamo", query = "SELECT p FROM Prestamoxcuenta p WHERE p.idPrestamo = :idPrestamo"), @NamedQuery(name = "Prestamoxcuenta.findByIdCuenta", query = "SELECT p FROM Prestamoxcuenta p WHERE p.idCuenta = :idCuenta")})
public class Prestamoxcuenta implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID_PRESTAMO", nullable = false, precision = 22)
    private BigDecimal idPrestamo;
    @Basic(optional = false)
    @Column(name = "ID_CUENTA", nullable = false)
    private BigInteger idCuenta;

    public Prestamoxcuenta() {
    }

    public Prestamoxcuenta(BigDecimal idPrestamo) {
        this.idPrestamo = idPrestamo;
    }

    public Prestamoxcuenta(BigDecimal idPrestamo, BigInteger idCuenta) {
        this.idPrestamo = idPrestamo;
        this.idCuenta = idCuenta;
    }

    public BigDecimal getIdPrestamo() {
        return idPrestamo;
    }

    public void setIdPrestamo(BigDecimal idPrestamo) {
        this.idPrestamo = idPrestamo;
    }

    public BigInteger getIdCuenta() {
        return idCuenta;
    }

    public void setIdCuenta(BigInteger idCuenta) {
        this.idCuenta = idCuenta;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idPrestamo != null ? idPrestamo.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Prestamoxcuenta)) {
            return false;
        }
        Prestamoxcuenta other = (Prestamoxcuenta) object;
        if ((this.idPrestamo == null && other.idPrestamo != null) || (this.idPrestamo != null && !this.idPrestamo.equals(other.idPrestamo))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "raccoon.suvisa.datos.entities.Prestamoxcuenta[idPrestamo=" + idPrestamo + "]";
    }

}
